#ifndef CVLIST_H
#define CVLIST_H

#include <QScrollArea>
#include <QList>
#include <QObjectList>
#include <QVBoxLayout>
#include <QFrame>
#include <QLayoutItem>
#include <QLabel>
#include <QMovie>
#include <QPaintEvent>
#include <QPainter>
#include <QStyleOption>

#include "cvactivitywiget.h"

class CVList : public QScrollArea
{
    Q_OBJECT
public:
    explicit CVList(bool showLoader = true, QWidget *parent = 0);
    //void paintEvent(QPaintEvent *);

    void addStretch();
signals:
    
public slots:
    void appendItem(QWidget *widget);
    void appendItem(CVActivityWidget *widget);
    void addItems(QList<CVActivityWidget *> list);
    void setItems(QList<CVActivityWidget *> list);
    void clear();
    void startLoading();
    void finishLoading();
private:
    QVBoxLayout *mainLayout;
    QWidget *innerWidget;

    bool showLoader;
    QLabel *loaderContainer;
    QMovie *loader;
};

#endif // CVLIST_H
